package com.ahao.aggregation;

import android.content.Context;

public class MResource {
    public static int getIdByName(Context context, String dataTypeName, String name) {
        String packageName = context.getPackageName();
        int id = context.getResources().getIdentifier(name, dataTypeName, packageName);
        return id;
    }
}
